package Sort;
import java.util.Arrays;
public class Sort {
    public static void main(String[] args) {

            String s = "You think you can, you do you like, you wish you think.";
           String[] words = s.toLowerCase().split(" ");
        for (int j = 1; j < words.length; j++){
            System.out.print(words[j] + " ");
        }
        System.out.println(" ");
        System.out.println(Arrays.toString(words));//回指定数组的内容的字符串表示形式。
        // 字符串表示由数组元素的列表组成，括在方括号（ "[]" ）中。 相邻的元素由字符", " （逗号后跟一个空格）分隔开。
        // 元素将转换为字符串，如String.valueOf(char)
        Arrays.sort(words);
        String recent = words[0];
        System.out.print(words[0] + " ");
        for (int i = 1; i < words.length; i++) {
            if (words[i].equals(recent))
               continue;
               System.out.print(words[i] + " ");
            recent =words[i];
        }
        }
}
